package com.eiei.ui;

import java.io.IOException;
import java.sql.Connection;

import com.eiei.db.pool.ConnectionPool;
import com.eiei.handler.Handler;
import com.eiei.thread.MessageReciveThread;
import com.eiei.utils.ConsoleUtils;

public class CMDUIMain {

	public static void main(String[] args) throws Exception {
		
		
		ConsoleUtils.output("程序正在启动");
		Connection con = ConnectionPool.getConnection();
		ConnectionPool.freeConection(con);
		MessageReciveThread.startThread();
		ConsoleUtils.outputHelp();
		while(true){
			try {
				String cmd = ConsoleUtils.input();
				
				Handler.cmdHandler(cmd);
				
			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
			
		}
		
		
	}
	
	
}
